package com.example.springboot_test02.Mapper;

import com.example.springboot_test02.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.time.LocalDate;
import java.time.LocalTime;

@Mapper
public interface EmpMapper {

    @Delete("delete from emp where id = #{id}")
    public void delete(Integer id);

    @Insert("INSERT into emp(username,password,name,gender,image,job,entrydate,create_time,update_time,dept_id) VALUES " +
            "(#{username},#{password},#{name},#{gender},#{image},#{job},#{entrydate},#{createTime},#{updateTime},#{deptId})")
    public void add(User user);
}

//private Integer id;
//private String username;
//private String password;
//private String name;
//private Short gender;
//private String image;
//private Short job;
//private LocalDate entrydata;
//private LocalTime createTime;
//private LocalDate updateTime;
//private Integer deptId;